home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Picture_Co2068165302007.psc / File Converter / Forms / File Converter.frm next >
Text File  |  2007-05-29  |  56KB  |  1,613 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  3. Begin VB.Form FileConverter 
  4.    BackColor       =   &H80000004&
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "File Converter"
  7.    ClientHeight    =   9285
  8.    ClientLeft      =   45
  9.    ClientTop       =   615
  10.    ClientWidth     =   14565
  11.    ControlBox      =   0   'False
  12.    FillStyle       =   0  'Solid
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    PaletteMode     =   2  'Custom
  17.    ScaleHeight     =   9285
  18.    ScaleWidth      =   14565
  19.    StartUpPosition =   2  'CenterScreen
  20.    Begin VB.CommandButton Command2 
  21.       Caption         =   "Select Picture"
  22.       BeginProperty Font 
  23.          Name            =   "MS Sans Serif"
  24.          Size            =   9.75
  25.          Charset         =   0
  26.          Weight          =   400
  27.          Underline       =   0   'False
  28.          Italic          =   0   'False
  29.          Strikethrough   =   0   'False
  30.       EndProperty
  31.       Height          =   375
  32.       Left            =   120
  33.       TabIndex        =   57
  34.       Top             =   360
  35.       Width           =   3255
  36.    End
  37.    Begin VB.Frame Frame1 
  38.       BackColor       =   &H00000000&
  39.       BorderStyle     =   0  'None
  40.       Height          =   1575
  41.       Left            =   240
  42.       TabIndex        =   44
  43.       Top             =   6720
  44.       Width           =   3015
  45.       Begin VB.PictureBox picColourReductionOptions 
  46.          BackColor       =   &H00000000&
  47.          BorderStyle     =   0  'None
  48.          Height          =   1455
  49.          Left            =   240
  50.          ScaleHeight     =   1455
  51.          ScaleWidth      =   2475
  52.          TabIndex        =   45
  53.          Top             =   120
  54.          Width           =   2475
  55.          Begin VB.OptionButton optReduceMethod 
  56.             Appearance      =   0  'Flat
  57.             BackColor       =   &H00000000&
  58.             Caption         =   "&Floyd-Stucci"
  59.             BeginProperty Font 
  60.                Name            =   "MS Sans Serif"
  61.                Size            =   9.75
  62.                Charset         =   0
  63.                Weight          =   400
  64.                Underline       =   0   'False
  65.                Italic          =   0   'False
  66.                Strikethrough   =   0   'False
  67.             EndProperty
  68.             ForeColor       =   &H00FFFFC0&
  69.             Height          =   255
  70.             Index           =   1
  71.             Left            =   0
  72.             TabIndex        =   51
  73.             Top             =   360
  74.             Width           =   2835
  75.          End
  76.          Begin VB.OptionButton optReduceMethod 
  77.             Appearance      =   0  'Flat
  78.             BackColor       =   &H00000000&
  79.             Caption         =   "&Default"
  80.             BeginProperty Font 
  81.                Name            =   "MS Sans Serif"
  82.                Size            =   9.75
  83.                Charset         =   0
  84.                Weight          =   400
  85.                Underline       =   0   'False
  86.                Italic          =   0   'False
  87.                Strikethrough   =   0   'False
  88.             EndProperty
  89.             ForeColor       =   &H00FFFFC0&
  90.             Height          =   195
  91.             Index           =   0
  92.             Left            =   0
  93.             TabIndex        =   50
  94.             Top             =   120
  95.             Value           =   -1  'True
  96.             Width           =   2835
  97.          End
  98.          Begin VB.OptionButton optReduceMethod 
  99.             Appearance      =   0  'Flat
  100.             BackColor       =   &H00000000&
  101.             Caption         =   "&Optimal Palette"
  102.             BeginProperty Font 
  103.                Name            =   "MS Sans Serif"
  104.                Size            =   9.75
  105.                Charset         =   0
  106.                Weight          =   400
  107.                Underline       =   0   'False
  108.                Italic          =   0   'False
  109.                Strikethrough   =   0   'False
  110.             EndProperty
  111.             ForeColor       =   &H00FFFFC0&
  112.             Height          =   255
  113.             Index           =   2
  114.             Left            =   0
  115.             TabIndex        =   49
  116.             Top             =   1080
  117.             Width           =   2835
  118.          End
  119.          Begin VB.PictureBox picFloydStucciOptions 
  120.             BackColor       =   &H00000000&
  121.             BorderStyle     =   0  'None
  122.             Height          =   495
  123.             Left            =   240
  124.             ScaleHeight     =   495
  125.             ScaleWidth      =   2715
  126.             TabIndex        =   46
  127.             Top             =   600
  128.             Width           =   2715
  129.             Begin VB.OptionButton optFloydStucciType 
  130.                Appearance      =   0  'Flat
  131.                BackColor       =   &H00000000&
  132.                Caption         =   "&Halftone"
  133.                BeginProperty Font 
  134.                   Name            =   "MS Sans Serif"
  135.                   Size            =   9.75
  136.                   Charset         =   0
  137.                   Weight          =   400
  138.                   Underline       =   0   'False
  139.                   Italic          =   0   'False
  140.                   Strikethrough   =   0   'False
  141.                EndProperty
  142.                ForeColor       =   &H00FFFFC0&
  143.                Height          =   255
  144.                Index           =   0
  145.                Left            =   60
  146.                TabIndex        =   48
  147.                Top             =   0
  148.                Width           =   2355
  149.             End
  150.             Begin VB.OptionButton optFloydStucciType 
  151.                Appearance      =   0  'Flat
  152.                BackColor       =   &H00000000&
  153.                Caption         =   "&Web Safe"
  154.                BeginProperty Font 
  155.                   Name            =   "MS Sans Serif"
  156.                   Size            =   9.75
  157.                   Charset         =   0
  158.                   Weight          =   400
  159.                   Underline       =   0   'False
  160.                   Italic          =   0   'False
  161.                   Strikethrough   =   0   'False
  162.                EndProperty
  163.                ForeColor       =   &H00FFFFC0&
  164.                Height          =   255
  165.                Index           =   1
  166.                Left            =   60
  167.                TabIndex        =   47
  168.                Top             =   240
  169.                Width           =   2355
  170.             End
  171.          End
  172.       End
  173.    End
  174.    Begin VB.Frame Frame2 
  175.       BackColor       =   &H00000000&
  176.       BorderStyle     =   0  'None
  177.       Caption         =   "Output Colour Depth:"
  178.       Height          =   1215
  179.       Left            =   240
  180.       TabIndex        =   38
  181.       Top             =   4560
  182.       Width           =   3135
  183.       Begin VB.PictureBox picColourDepthOptions 
  184.          BackColor       =   &H00000000&
  185.          BorderStyle     =   0  'None
  186.          Height          =   1095
  187.          Left            =   240
  188.          ScaleHeight     =   1095
  189.          ScaleWidth      =   2535
  190.          TabIndex        =   39
  191.          Top             =   120
  192.          Width           =   2535
  193.          Begin VB.OptionButton optColourDepth 
  194.             Appearance      =   0  'Flat
  195.             BackColor       =   &H00000000&
  196.             Caption         =   "&Black and White"
  197.             Enabled         =   0   'False
  198.             BeginProperty Font 
  199.                Name            =   "MS Sans Serif"
  200.                Size            =   9.75
  201.                Charset         =   0
  202.                Weight          =   400
  203.                Underline       =   0   'False
  204.                Italic          =   0   'False
  205.                Strikethrough   =   0   'False
  206.             EndProperty
  207.             ForeColor       =   &H00FFFFC0&
  208.             Height          =   315
  209.             Index           =   0
  210.             Left            =   0
  211.             TabIndex        =   43
  212.             Top             =   0
  213.             Width           =   2835
  214.          End
  215.          Begin VB.OptionButton optColourDepth 
  216.             Appearance      =   0  'Flat
  217.             BackColor       =   &H00000000&
  218.             Caption         =   "&16 Colour"
  219.             Enabled         =   0   'False
  220.             BeginProperty Font 
  221.                Name            =   "MS Sans Serif"
  222.                Size            =   9.75
  223.                Charset         =   0
  224.                Weight          =   400
  225.                Underline       =   0   'False
  226.                Italic          =   0   'False
  227.                Strikethrough   =   0   'False
  228.             EndProperty
  229.             ForeColor       =   &H00FFFFC0&
  230.             Height          =   315
  231.             Index           =   1
  232.             Left            =   0
  233.             TabIndex        =   42
  234.             Top             =   240
  235.             Width           =   2835
  236.          End
  237.          Begin VB.OptionButton optColourDepth 
  238.             Appearance      =   0  'Flat
  239.             BackColor       =   &H00000000&
  240.             Caption         =   "&256 Colour"
  241.             Enabled         =   0   'False
  242.             BeginProperty Font 
  243.                Name            =   "MS Sans Serif"
  244.                Size            =   9.75
  245.                Charset         =   0
  246.                Weight          =   400
  247.                Underline       =   0   'False
  248.                Italic          =   0   'False
  249.                Strikethrough   =   0   'False
  250.             EndProperty
  251.             ForeColor       =   &H00FFFFC0&
  252.             Height          =   315
  253.             Index           =   2
  254.             Left            =   0
  255.             TabIndex        =   41
  256.             Top             =   480
  257.             Width           =   2835
  258.          End
  259.          Begin VB.OptionButton optColourDepth 
  260.             Appearance      =   0  'Flat
  261.             BackColor       =   &H00000000&
  262.             Caption         =   "&True Colour"
  263.             Enabled         =   0   'False
  264.             BeginProperty Font 
  265.                Name            =   "MS Sans Serif"
  266.                Size            =   9.75
  267.                Charset         =   0
  268.                Weight          =   400
  269.                Underline       =   0   'False
  270.                Italic          =   0   'False
  271.                Strikethrough   =   0   'False
  272.             EndProperty
  273.             ForeColor       =   &H00FFFFC0&
  274.             Height          =   315
  275.             Index           =   3
  276.             Left            =   0
  277.             TabIndex        =   40
  278.             Top             =   720
  279.             Value           =   -1  'True
  280.             Width           =   2835
  281.          End
  282.       End
  283.    End
  284.    Begin VB.Frame Frame3 
  285.       BackColor       =   &H00000000&
  286.       BorderStyle     =   0  'None
  287.       Height          =   1935
  288.       Left            =   240
  289.       TabIndex        =   30
  290.       Top             =   1680
  291.       Width           =   3135
  292.       Begin VB.OptionButton Option1 
  293.          Appearance      =   0  'Flat
  294.          BackColor       =   &H00000000&
  295.          Caption         =   "Windows MetaFile (*wmf)"
  296.          Enabled         =   0   'False
  297.          BeginProperty Font 
  298.             Name            =   "MS Sans Serif"
  299.             Size            =   9.75
  300.             Charset         =   0
  301.             Weight          =   400
  302.             Underline       =   0   'False
  303.             Italic          =   0   'False
  304.             Strikethrough   =   0   'False
  305.          EndProperty
  306.          ForeColor       =   &H00FFFFC0&
  307.          Height          =   285
  308.          Index           =   6
  309.          Left            =   240
  310.          TabIndex        =   37
  311.          Top             =   1560
  312.          Width           =   2655
  313.       End
  314.       Begin VB.OptionButton Option1 
  315.          Appearance      =   0  'Flat
  316.          BackColor       =   &H00000000&
  317.          Caption         =   "Jpeg Images (*.jpeg)"
  318.          Enabled         =   0   'False
  319.          BeginProperty Font 
  320.             Name            =   "MS Sans Serif"
  321.             Size            =   9.75
  322.             Charset         =   0
  323.             Weight          =   400
  324.             Underline       =   0   'False
  325.             Italic          =   0   'False
  326.             Strikethrough   =   0   'False
  327.          EndProperty
  328.          ForeColor       =   &H00FFFFC0&
  329.          Height          =   285
  330.          Index           =   5
  331.          Left            =   240
  332.          TabIndex        =   36
  333.          Top             =   1320
  334.          Width           =   2535
  335.       End
  336.       Begin VB.OptionButton Option1 
  337.          Appearance      =   0  'Flat
  338.          BackColor       =   &H00000000&
  339.          Caption         =   "Tiff Images (*.tiff)"
  340.          Enabled         =   0   'False
  341.          BeginProperty Font 
  342.             Name            =   "MS Sans Serif"
  343.             Size            =   9.75
  344.             Charset         =   0
  345.             Weight          =   400
  346.             Underline       =   0   'False
  347.             Italic          =   0   'False
  348.             Strikethrough   =   0   'False
  349.          EndProperty
  350.          ForeColor       =   &H00FFFFC0&
  351.          Height          =   285
  352.          Index           =   4
  353.          Left            =   240
  354.          TabIndex        =   35
  355.          Top             =   1080
  356.          Width           =   2055
  357.       End
  358.       Begin VB.OptionButton Option1 
  359.          Appearance      =   0  'Flat
  360.          BackColor       =   &H00000000&
  361.          Caption         =   "Bitmap Images (*.bmp)"
  362.          Enabled         =   0   'False
  363.          BeginProperty Font 
  364.             Name            =   "MS Sans Serif"
  365.             Size            =   9.75
  366.             Charset         =   0
  367.             Weight          =   400
  368.             Underline       =   0   'False
  369.             Italic          =   0   'False
  370.             Strikethrough   =   0   'False
  371.          EndProperty
  372.          ForeColor       =   &H00FFFFC0&
  373.          Height          =   285
  374.          Index           =   3
  375.          Left            =   240
  376.          TabIndex        =   34
  377.          Top             =   840
  378.          Width           =   2535
  379.       End
  380.       Begin VB.OptionButton Option1 
  381.          Appearance      =   0  'Flat
  382.          BackColor       =   &H00000000&
  383.          Caption         =   "True Vision Images (*.tga)"
  384.          Enabled         =   0   'False
  385.          BeginProperty Font 
  386.             Name            =   "MS Sans Serif"
  387.             Size            =   9.75
  388.             Charset         =   0
  389.             Weight          =   400
  390.             Underline       =   0   'False
  391.             Italic          =   0   'False
  392.             Strikethrough   =   0   'False
  393.          EndProperty
  394.          ForeColor       =   &H00FFFFC0&
  395.          Height          =   285
  396.          Index           =   2
  397.          Left            =   240
  398.          TabIndex        =   33
  399.          Top             =   600
  400.          Width           =   2655
  401.       End
  402.       Begin VB.OptionButton Option1 
  403.          Appearance      =   0  'Flat
  404.          BackColor       =   &H00000000&
  405.          Caption         =   "Cumpuserve  Images (*.gif)"
  406.          Enabled         =   0   'False
  407.          BeginProperty Font 
  408.             Name            =   "MS Sans Serif"
  409.             Size            =   9.75
  410.             Charset         =   0
  411.             Weight          =   400
  412.             Underline       =   0   'False
  413.             Italic          =   0   'False
  414.             Strikethrough   =   0   'False
  415.          EndProperty
  416.          ForeColor       =   &H00FFFFC0&
  417.          Height          =   285
  418.          Index           =   1
  419.          Left            =   240
  420.          TabIndex        =   32
  421.          Top             =   360
  422.          Width           =   2775
  423.       End
  424.       Begin VB.OptionButton Option1 
  425.          Appearance      =   0  'Flat
  426.          BackColor       =   &H00000000&
  427.          Caption         =   "Portable Net. Graphics (*.png)"
  428.          Enabled         =   0   'False
  429.          BeginProperty Font 
  430.             Name            =   "MS Sans Serif"
  431.             Size            =   9.75
  432.             Charset         =   0
  433.             Weight          =   400
  434.             Underline       =   0   'False
  435.             Italic          =   0   'False
  436.             Strikethrough   =   0   'False
  437.          EndProperty
  438.          ForeColor       =   &H00FFFFC0&
  439.          Height          =   285
  440.          Index           =   0
  441.          Left            =   240
  442.          TabIndex        =   31
  443.          Top             =   120
  444.          Width           =   3135
  445.       End
  446.    End
  447.    Begin VB.TextBox Text1 
  448.       Height          =   285
  449.       Left            =   13320
  450.       TabIndex        =   23
  451.       Text            =   "Text1"
  452.       Top             =   0
  453.       Visible         =   0   'False
  454.       Width           =   975
  455.    End
  456.    Begin VB.CommandButton cmdSave 
  457.       Caption         =   "Convert"
  458.       Enabled         =   0   'False
  459.       BeginProperty Font 
  460.          Name            =   "MS Sans Serif"
  461.          Size            =   9.75
  462.          Charset         =   0
  463.          Weight          =   400
  464.          Underline       =   0   'False
  465.          Italic          =   0   'False
  466.          Strikethrough   =   0   'False
  467.       EndProperty
  468.       Height          =   375
  469.       Left            =   120
  470.       TabIndex        =   22
  471.       Top             =   8760
  472.       Width           =   3255
  473.    End
  474.    Begin VB.VScrollBar VScroll1 
  475.       Height          =   8295
  476.       Left            =   10680
  477.       Max             =   255
  478.       SmallChange     =   100
  479.       TabIndex        =   4
  480.       Top             =   360
  481.       Width           =   375
  482.    End
  483.    Begin VB.HScrollBar HScroll1 
  484.       Height          =   375
  485.       Left            =   3600
  486.       SmallChange     =   100
  487.       TabIndex        =   3
  488.       Top             =   8760
  489.       Width           =   6975
  490.    End
  491.    Begin VB.PictureBox Picture3 
  492.       Height          =   8055
  493.       Left            =   3720
  494.       ScaleHeight     =   7980
  495.       ScaleMode       =   0  'User
  496.       ScaleWidth      =   6675
  497.       TabIndex        =   2
  498.       Top             =   480
  499.       Width           =   6735
  500.       Begin VB.PictureBox picCurrent1 
  501.          AutoSize        =   -1  'True
  502.          Height          =   8475
  503.          Left            =   -120
  504.          ScaleHeight     =   8415
  505.          ScaleWidth      =   6795
  506.          TabIndex        =   20
  507.          Top             =   -120
  508.          Width           =   6855
  509.          Begin VB.PictureBox picCurrent 
  510.             Appearance      =   0  'Flat
  511.             AutoSize        =   -1  'True
  512.             BackColor       =   &H80000005&
  513.             BorderStyle     =   0  'None
  514.             CausesValidation=   0   'False
  515.             FillStyle       =   0  'Solid
  516.             ForeColor       =   &H80000008&
  517.             Height          =   7920
  518.             Left            =   120
  519.             ScaleHeight     =   7920
  520.             ScaleWidth      =   6645
  521.             TabIndex        =   21
  522.             Top             =   120
  523.             Width           =   6645
  524.          End
  525.       End
  526.    End
  527.    Begin VB.PictureBox Picture2 
  528.       AutoRedraw      =   -1  'True
  529.       AutoSize        =   -1  'True
  530.       Height          =   375
  531.       Left            =   4200
  532.       ScaleHeight     =   315
  533.       ScaleWidth      =   5175
  534.       TabIndex        =   0
  535.       Top             =   2280
  536.       Visible         =   0   'False
  537.       Width           =   5235
  538.       Begin VB.Label Label1 
  539.          Caption         =   "Label1"
  540.          Height          =   195
  541.          Left            =   120
  542.          TabIndex        =   1
  543.          Top             =   0
  544.          Width           =   675
  545.       End
  546.    End
  547.    Begin MSComDlg.CommonDialog CommonDialog2 
  548.       Left            =   240
  549.       Top             =   8160
  550.       _ExtentX        =   847
  551.       _ExtentY        =   847
  552.       _Version        =   393216
  553.    End
  554.    Begin MSComDlg.CommonDialog CommonDialog1 
  555.       Left            =   240
  556.       Top             =   8280
  557.       _ExtentX        =   847
  558.       _ExtentY        =   847
  559.       _Version        =   393216
  560.    End
  561.    Begin VB.CheckBox Check1 
  562.       Caption         =   "Check1"
  563.       Height          =   375
  564.       Left            =   240
  565.       TabIndex        =   52
  566.       Top             =   8160
  567.       Visible         =   0   'False
  568.       Width           =   255
  569.    End
  570.    Begin VB.Shape Shape6 
  571.       BorderColor     =   &H00E0E0E0&
  572.       Height          =   8295
  573.       Left            =   3600
  574.       Top             =   360
  575.       Width           =   6975
  576.    End
  577.    Begin VB.Label LblPica 
  578.       AutoSize        =   -1  'True
  579.       BackStyle       =   0  'Transparent
  580.       Caption         =   "0"
  581.       BeginProperty Font 
  582.          Name            =   "MS Sans Serif"
  583.          Size            =   9.75
  584.          Charset         =   0
  585.          Weight          =   400
  586.          Underline       =   0   'False
  587.          Italic          =   0   'False
  588.          Strikethrough   =   0   'False
  589.       EndProperty
  590.       ForeColor       =   &H00FFFFC0&
  591.       Height          =   240
  592.       Left            =   12600
  593.       TabIndex        =   59
  594.       Top             =   2520
  595.       Width           =   105
  596.    End
  597.    Begin VB.Label lblInches 
  598.       AutoSize        =   -1  'True
  599.       BackStyle       =   0  'Transparent
  600.       Caption         =   "0"
  601.       BeginProperty Font 
  602.          Name            =   "MS Sans Serif"
  603.          Size            =   9.75
  604.          Charset         =   0
  605.          Weight          =   400
  606.          Underline       =   0   'False
  607.          Italic          =   0   'False
  608.          Strikethrough   =   0   'False
  609.       EndProperty
  610.       ForeColor       =   &H00FFFFC0&
  611.       Height          =   240
  612.       Left            =   12600
  613.       TabIndex        =   58
  614.       Top             =   2880
  615.       Width           =   105
  616.    End
  617.    Begin VB.Label Label20 
  618.       AutoSize        =   -1  'True
  619.       BackStyle       =   0  'Transparent
  620.       Caption         =   "Please Wait..."
  621.       BeginProperty Font 
  622.          Name            =   "MS Sans Serif"
  623.          Size            =   13.5
  624.          Charset         =   0
  625.          Weight          =   400
  626.          Underline       =   0   'False
  627.          Italic          =   0   'False
  628.          Strikethrough   =   0   'False
  629.       EndProperty
  630.       ForeColor       =   &H00FFFFC0&
  631.       Height          =   360
  632.       Left            =   11280
  633.       TabIndex        =   56
  634.       Top             =   6480
  635.       Visible         =   0   'False
  636.       Width           =   1695
  637.    End
  638.    Begin VB.Shape Shape4 
  639.       BorderColor     =   &H00E0E0E0&
  640.       Height          =   1815
  641.       Left            =   120
  642.       Shape           =   4  'Rounded Rectangle
  643.       Top             =   6600
  644.       Width           =   3255
  645.    End
  646.    Begin VB.Line Line2 
  647.       BorderColor     =   &H00E0E0E0&
  648.       Index           =   2
  649.       X1              =   120
  650.       X2              =   3360
  651.       Y1              =   6480
  652.       Y2              =   6480
  653.    End
  654.    Begin VB.Label Label19 
  655.       AutoSize        =   -1  'True
  656.       BackStyle       =   0  'Transparent
  657.       Caption         =   "Output Colour Reduction Method"
  658.       BeginProperty Font 
  659.          Name            =   "MS Sans Serif"
  660.          Size            =   9.75
  661.          Charset         =   0
  662.          Weight          =   700
  663.          Underline       =   0   'False
  664.          Italic          =   0   'False
  665.          Strikethrough   =   0   'False
  666.       EndProperty
  667.       ForeColor       =   &H00FFFFC0&
  668.       Height          =   240
  669.       Left            =   120
  670.       TabIndex        =   55
  671.       Top             =   6120
  672.       Width           =   3345
  673.    End
  674.    Begin VB.Shape Shape3 
  675.       BorderColor     =   &H00FFFFFF&
  676.       Height          =   1455
  677.       Left            =   120
  678.       Shape           =   4  'Rounded Rectangle
  679.       Top             =   4440
  680.       Width           =   3375
  681.    End
  682.    Begin VB.Line Line2 
  683.       BorderColor     =   &H00FFFFFF&
  684.       Index           =   1
  685.       X1              =   120
  686.       X2              =   3480
  687.       Y1              =   4320
  688.       Y2              =   4320
  689.    End
  690.    Begin VB.Label Label18 
  691.       AutoSize        =   -1  'True
  692.       BackStyle       =   0  'Transparent
  693.       Caption         =   "Output Colour Depth"
  694.       BeginProperty Font 
  695.          Name            =   "MS Sans Serif"
  696.          Size            =   9.75
  697.          Charset         =   0
  698.          Weight          =   700
  699.          Underline       =   0   'False
  700.          Italic          =   0   'False
  701.          Strikethrough   =   0   'False
  702.       EndProperty
  703.       ForeColor       =   &H00FFFFC0&
  704.       Height          =   240
  705.       Left            =   120
  706.       TabIndex        =   54
  707.       Top             =   3960
  708.       Width           =   2085
  709.    End
  710.    Begin VB.Line Line2 
  711.       BorderColor     =   &H00E0E0E0&
  712.       Index           =   0
  713.       X1              =   120
  714.       X2              =   3480
  715.       Y1              =   1320
  716.       Y2              =   1320
  717.    End
  718.    Begin VB.Shape Shape2 
  719.       BackColor       =   &H00FFFFFF&
  720.       BorderColor     =   &H00E0E0E0&
  721.       Height          =   2295
  722.       Left            =   120
  723.       Shape           =   4  'Rounded Rectangle
  724.       Top             =   1440
  725.       Width           =   3375
  726.    End
  727.    Begin VB.Label Label12 
  728.       AutoSize        =   -1  'True
  729.       BackStyle       =   0  'Transparent
  730.       Caption         =   "Output Format"
  731.       BeginProperty Font 
  732.          Name            =   "MS Sans Serif"
  733.          Size            =   9.75
  734.          Charset         =   0
  735.          Weight          =   700
  736.          Underline       =   0   'False
  737.          Italic          =   0   'False
  738.          Strikethrough   =   0   'False
  739.       EndProperty
  740.       ForeColor       =   &H00FFFFC0&
  741.       Height          =   240
  742.       Left            =   240
  743.       TabIndex        =   53
  744.       Top             =   960
  745.       Width           =   1455
  746.    End
  747.    Begin VB.Label Label11 
  748.       AutoSize        =   -1  'True
  749.       BackStyle       =   0  'Transparent
  750.       Caption         =   "y"
  751.       BeginProperty Font 
  752.          Name            =   "MS Sans Serif"
  753.          Size            =   9.75
  754.          Charset         =   0
  755.          Weight          =   700
  756.          Underline       =   0   'False
  757.          Italic          =   0   'False
  758.          Strikethrough   =   0   'False
  759.       EndProperty
  760.       ForeColor       =   &H00FFFFC0&
  761.       Height          =   240
  762.       Left            =   13560
  763.       TabIndex        =   29
  764.       Top             =   5040
  765.       Width           =   135
  766.    End
  767.    Begin VB.Label Label17 
  768.       AutoSize        =   -1  'True
  769.       BackStyle       =   0  'Transparent
  770.       Caption         =   "x"
  771.       BeginProperty Font 
  772.          Name            =   "MS Sans Serif"
  773.          Size            =   9.75
  774.          Charset         =   0
  775.          Weight          =   700
  776.          Underline       =   0   'False
  777.          Italic          =   0   'False
  778.          Strikethrough   =   0   'False
  779.       EndProperty
  780.       ForeColor       =   &H00FFFFC0&
  781.       Height          =   240
  782.       Left            =   12360
  783.       TabIndex        =   28
  784.       Top             =   5040
  785.       Width           =   120
  786.    End
  787.    Begin VB.Shape Shape1 
  788.       BorderColor     =   &H00E0E0E0&
  789.       Height          =   735
  790.       Left            =   11280
  791.       Shape           =   4  'Rounded Rectangle
  792.       Top             =   4800
  793.       Width           =   3135
  794.    End
  795.    Begin VB.Label Label16 
  796.       AutoSize        =   -1  'True
  797.       BackStyle       =   0  'Transparent
  798.       Caption         =   "X = "
  799.       BeginProperty Font 
  800.          Name            =   "MS Sans Serif"
  801.          Size            =   9.75
  802.          Charset         =   0
  803.          Weight          =   700
  804.          Underline       =   0   'False
  805.          Italic          =   0   'False
  806.          Strikethrough   =   0   'False
  807.       EndProperty
  808.       ForeColor       =   &H00FFFFC0&
  809.       Height          =   240
  810.       Left            =   11880
  811.       TabIndex        =   27
  812.       Top             =   5040
  813.       Width           =   390
  814.    End
  815.    Begin VB.Label Label14 
  816.       AutoSize        =   -1  'True
  817.       BackStyle       =   0  'Transparent
  818.       Caption         =   "Y ="
  819.       BeginProperty Font 
  820.          Name            =   "MS Sans Serif"
  821.          Size            =   9.75
  822.          Charset         =   0
  823.          Weight          =   700
  824.          Underline       =   0   'False
  825.          Italic          =   0   'False
  826.          Strikethrough   =   0   'False
  827.       EndProperty
  828.       ForeColor       =   &H00FFFFC0&
  829.       Height          =   240
  830.       Left            =   13080
  831.       TabIndex        =   26
  832.       Top             =   5040
  833.       Width           =   345
  834.    End
  835.    Begin VB.Label Label15 
  836.       AutoSize        =   -1  'True
  837.       BackStyle       =   0  'Transparent
  838.       Caption         =   "Scaling and Point Coordinates"
  839.       BeginProperty Font 
  840.          Name            =   "MS Sans Serif"
  841.          Size            =   9.75
  842.          Charset         =   0
  843.          Weight          =   700
  844.          Underline       =   0   'False
  845.          Italic          =   0   'False
  846.          Strikethrough   =   0   'False
  847.       EndProperty
  848.       ForeColor       =   &H00FFFFC0&
  849.       Height          =   240
  850.       Left            =   11280
  851.       TabIndex        =   25
  852.       Top             =   4320
  853.       Width           =   3150
  854.    End
  855.    Begin VB.Line Line3 
  856.       BorderColor     =   &H00E0E0E0&
  857.       X1              =   11280
  858.       X2              =   14400
  859.       Y1              =   4680
  860.       Y2              =   4680
  861.    End
  862.    Begin VB.Shape Shape5 
  863.       BorderColor     =   &H00E0E0E0&
  864.       Height          =   2895
  865.       Left            =   11160
  866.       Shape           =   4  'Rounded Rectangle
  867.       Top             =   840
  868.       Width           =   3135
  869.    End
  870.    Begin VB.Label Lbl 
  871.       AutoSize        =   -1  'True
  872.       BackColor       =   &H00FFC0C0&
  873.       BackStyle       =   0  'Transparent
  874.       Caption         =   "0"
  875.       BeginProperty Font 
  876.          Name            =   "MS Sans Serif"
  877.          Size            =   9.75
  878.          Charset         =   0
  879.          Weight          =   400
  880.          Underline       =   0   'False
  881.          Italic          =   0   'False
  882.          Strikethrough   =   0   'False
  883.       EndProperty
  884.       ForeColor       =   &H00FFFFC0&
  885.       Height          =   240
  886.       Index           =   7
  887.       Left            =   12600
  888.       TabIndex        =   24
  889.       Top             =   3240
  890.       Width           =   105
  891.    End
  892.    Begin VB.Label Lbl 
  893.       AutoSize        =   -1  'True
  894.       BackStyle       =   0  'Transparent
  895.       Caption         =   "0"
  896.       BeginProperty Font 
  897.          Name            =   "MS Sans Serif"
  898.          Size            =   9.75
  899.          Charset         =   0
  900.          Weight          =   400
  901.          Underline       =   0   'False
  902.          Italic          =   0   'False
  903.          Strikethrough   =   0   'False
  904.       EndProperty
  905.       ForeColor       =   &H00FFFFC0&
  906.       Height          =   240
  907.       Index           =   9
  908.       Left            =   12600
  909.       TabIndex        =   19
  910.       Top             =   2160
  911.       Width           =   105
  912.    End
  913.    Begin VB.Label Lbl 
  914.       AutoSize        =   -1  'True
  915.       BackColor       =   &H00FFC0C0&
  916.       BackStyle       =   0  'Transparent
  917.       Caption         =   "0"
  918.       BeginProperty Font 
  919.          Name            =   "MS Sans Serif"
  920.          Size            =   9.75
  921.          Charset         =   0
  922.          Weight          =   400
  923.          Underline       =   0   'False
  924.          Italic          =   0   'False
  925.          Strikethrough   =   0   'False
  926.       EndProperty
  927.       ForeColor       =   &H00FFFFC0&
  928.       Height          =   240
  929.       Index           =   8
  930.       Left            =   12600
  931.       TabIndex        =   18
  932.       Top             =   3840
  933.       Width           =   105
  934.    End
  935.    Begin VB.Label Lbl 
  936.       AutoSize        =   -1  'True
  937.       BackColor       =   &H00FFC0C0&
  938.       BackStyle       =   0  'Transparent
  939.       Caption         =   "0"
  940.       BeginProperty Font 
  941.          Name            =   "MS Sans Serif"
  942.          Size            =   9.75
  943.          Charset         =   0
  944.          Weight          =   400
  945.          Underline       =   0   'False
  946.          Italic          =   0   'False
  947.          Strikethrough   =   0   'False
  948.       EndProperty
  949.       ForeColor       =   &H00FFFFC0&
  950.       Height          =   240
  951.       Index           =   0
  952.       Left            =   12600
  953.       TabIndex        =   17
  954.       Top             =   1080
  955.       Width           =   105
  956.    End
  957.    Begin VB.Label Lbl 
  958.       AutoSize        =   -1  'True
  959.       BackColor       =   &H00FFC0C0&
  960.       BackStyle       =   0  'Transparent
  961.       Caption         =   "0"
  962.       BeginProperty Font 
  963.          Name            =   "MS Sans Serif"
  964.          Size            =   9.75
  965.          Charset         =   0
  966.          Weight          =   400
  967.          Underline       =   0   'False
  968.          Italic          =   0   'False
  969.          Strikethrough   =   0   'False
  970.       EndProperty
  971.       ForeColor       =   &H00FFFFC0&
  972.       Height          =   240
  973.       Index           =   1
  974.       Left            =   12600
  975.       TabIndex        =   16
  976.       Top             =   1440
  977.       Width           =   105
  978.    End
  979.    Begin VB.Label Lbl 
  980.       AutoSize        =   -1  'True
  981.       BackColor       =   &H00FFC0C0&
  982.       BackStyle       =   0  'Transparent
  983.       BeginProperty Font 
  984.          Name            =   "MS Sans Serif"
  985.          Size            =   9.75
  986.          Charset         =   0
  987.          Weight          =   400
  988.          Underline       =   0   'False
  989.          Italic          =   0   'False
  990.          Strikethrough   =   0   'False
  991.       EndProperty
  992.       ForeColor       =   &H00FFFFC0&
  993.       Height          =   240
  994.       Index           =   3
  995.       Left            =   12240
  996.       TabIndex        =   15
  997.       Top             =   2160
  998.       Width           =   45
  999.    End
  1000.    Begin VB.Label Lbl 
  1001.       AutoSize        =   -1  'True
  1002.       BackColor       =   &H00FFC0C0&
  1003.       BackStyle       =   0  'Transparent
  1004.       BeginProperty Font 
  1005.          Name            =   "MS Sans Serif"
  1006.          Size            =   9.75
  1007.          Charset         =   0
  1008.          Weight          =   400
  1009.          Underline       =   0   'False
  1010.          Italic          =   0   'False
  1011.          Strikethrough   =   0   'False
  1012.       EndProperty
  1013.       ForeColor       =   &H00FFFFC0&
  1014.       Height          =   240
  1015.       Index           =   4
  1016.       Left            =   12240
  1017.       TabIndex        =   14
  1018.       Top             =   2520
  1019.       Width           =   45
  1020.    End
  1021.    Begin VB.Label Lbl 
  1022.       AutoSize        =   -1  'True
  1023.       BackColor       =   &H00FFC0C0&
  1024.       BackStyle       =   0  'Transparent
  1025.       BeginProperty Font 
  1026.          Name            =   "MS Sans Serif"
  1027.          Size            =   9.75
  1028.          Charset         =   0
  1029.          Weight          =   400
  1030.          Underline       =   0   'False
  1031.          Italic          =   0   'False
  1032.          Strikethrough   =   0   'False
  1033.       EndProperty
  1034.       ForeColor       =   &H00FFFFC0&
  1035.       Height          =   240
  1036.       Index           =   6
  1037.       Left            =   12360
  1038.       TabIndex        =   13
  1039.       Top             =   3240
  1040.       Width           =   45
  1041.    End
  1042.    Begin VB.Label Label10 
  1043.       AutoSize        =   -1  'True
  1044.       BackColor       =   &H00FFC0C0&
  1045.       BackStyle       =   0  'Transparent
  1046.       Caption         =   "File Size"
  1047.       BeginProperty Font 
  1048.          Name            =   "MS Sans Serif"
  1049.          Size            =   9.75
  1050.          Charset         =   0
  1051.          Weight          =   400
  1052.          Underline       =   0   'False
  1053.          Italic          =   0   'False
  1054.          Strikethrough   =   0   'False
  1055.       EndProperty
  1056.       ForeColor       =   &H00FFFFC0&
  1057.       Height          =   240
  1058.       Left            =   11520
  1059.       TabIndex        =   12
  1060.       Top             =   3240
  1061.       Width           =   765
  1062.    End
  1063.    Begin VB.Label Label8 
  1064.       AutoSize        =   -1  'True
  1065.       BackColor       =   &H00FFC0C0&
  1066.       BackStyle       =   0  'Transparent
  1067.       Caption         =   "Inches :"
  1068.       BeginProperty Font 
  1069.          Name            =   "MS Sans Serif"
  1070.          Size            =   9.75
  1071.          Charset         =   0
  1072.          Weight          =   400
  1073.          Underline       =   0   'False
  1074.          Italic          =   0   'False
  1075.          Strikethrough   =   0   'False
  1076.       EndProperty
  1077.       ForeColor       =   &H00FFFFC0&
  1078.       Height          =   240
  1079.       Left            =   11760
  1080.       TabIndex        =   11
  1081.       Top             =   2880
  1082.       Width           =   675
  1083.    End
  1084.    Begin VB.Label Label7 
  1085.       AutoSize        =   -1  'True
  1086.       BackColor       =   &H00FFC0C0&
  1087.       BackStyle       =   0  'Transparent
  1088.       Caption         =   "Pica :"
  1089.       BeginProperty Font 
  1090.          Name            =   "MS Sans Serif"
  1091.          Size            =   9.75
  1092.          Charset         =   0
  1093.          Weight          =   400
  1094.          Underline       =   0   'False
  1095.          Italic          =   0   'False
  1096.          Strikethrough   =   0   'False
  1097.       EndProperty
  1098.       ForeColor       =   &H00FFFFC0&
  1099.       Height          =   240
  1100.       Left            =   11760
  1101.       TabIndex        =   10
  1102.       Top             =   2520
  1103.       Width           =   495
  1104.    End
  1105.    Begin VB.Label Label6 
  1106.       AutoSize        =   -1  'True
  1107.       BackColor       =   &H00FFC0C0&
  1108.       BackStyle       =   0  'Transparent
  1109.       Caption         =   "Pixel :"
  1110.       BeginProperty Font 
  1111.          Name            =   "MS Sans Serif"
  1112.          Size            =   9.75
  1113.          Charset         =   0
  1114.          Weight          =   400
  1115.          Underline       =   0   'False
  1116.          Italic          =   0   'False
  1117.          Strikethrough   =   0   'False
  1118.       EndProperty
  1119.       ForeColor       =   &H00FFFFC0&
  1120.       Height          =   240
  1121.       Left            =   11760
  1122.       TabIndex        =   9
  1123.       Top             =   2160
  1124.       Width           =   525
  1125.    End
  1126.    Begin VB.Label Label5 
  1127.       AutoSize        =   -1  'True
  1128.       BackColor       =   &H00FFC0C0&
  1129.       BackStyle       =   0  'Transparent
  1130.       Caption         =   "Images size :"
  1131.       BeginProperty Font 
  1132.          Name            =   "MS Sans Serif"
  1133.          Size            =   9.75
  1134.          Charset         =   0
  1135.          Weight          =   400
  1136.          Underline       =   0   'False
  1137.          Italic          =   0   'False
  1138.          Strikethrough   =   0   'False
  1139.       EndProperty
  1140.       ForeColor       =   &H00FFFFC0&
  1141.       Height          =   240
  1142.       Left            =   11400
  1143.       TabIndex        =   8
  1144.       Top             =   1800
  1145.       Width           =   1170
  1146.    End
  1147.    Begin VB.Label Label4 
  1148.       AutoSize        =   -1  'True
  1149.       BackColor       =   &H00FFC0C0&
  1150.       BackStyle       =   0  'Transparent
  1151.       Caption         =   "File Type :"
  1152.       BeginProperty Font 
  1153.          Name            =   "MS Sans Serif"
  1154.          Size            =   9.75
  1155.          Charset         =   0
  1156.          Weight          =   400
  1157.          Underline       =   0   'False
  1158.          Italic          =   0   'False
  1159.          Strikethrough   =   0   'False
  1160.       EndProperty
  1161.       ForeColor       =   &H00FFFFC0&
  1162.       Height          =   240
  1163.       Left            =   11400
  1164.       TabIndex        =   7
  1165.       Top             =   1440
  1166.       Width           =   945
  1167.    End
  1168.    Begin VB.Label Label3 
  1169.       AutoSize        =   -1  'True
  1170.       BackColor       =   &H00FFC0C0&
  1171.       BackStyle       =   0  'Transparent
  1172.       Caption         =   "File Name :"
  1173.       BeginProperty Font 
  1174.          Name            =   "MS Sans Serif"
  1175.          Size            =   9.75
  1176.          Charset         =   0
  1177.          Weight          =   400
  1178.          Underline       =   0   'False
  1179.          Italic          =   0   'False
  1180.          Strikethrough   =   0   'False
  1181.       EndProperty
  1182.       ForeColor       =   &H00FFFFC0&
  1183.       Height          =   240
  1184.       Left            =   11400
  1185.       TabIndex        =   6
  1186.       Top             =   1080
  1187.       Width           =   1020
  1188.    End
  1189.    Begin VB.Line Line1 
  1190.       BorderColor     =   &H00E0E0E0&
  1191.       X1              =   11280
  1192.       X2              =   14280
  1193.       Y1              =   720
  1194.       Y2              =   720
  1195.    End
  1196.    Begin VB.Label Label2 
  1197.       AutoSize        =   -1  'True
  1198.       BackColor       =   &H00FFC0C0&
  1199.       BackStyle       =   0  'Transparent
  1200.       Caption         =   "File Information"
  1201.       BeginProperty Font 
  1202.          Name            =   "MS Sans Serif"
  1203.          Size            =   9.75
  1204.          Charset         =   0
  1205.          Weight          =   700
  1206.          Underline       =   0   'False
  1207.          Italic          =   0   'False
  1208.          Strikethrough   =   0   'False
  1209.       EndProperty
  1210.       ForeColor       =   &H00FFFFC0&
  1211.       Height          =   240
  1212.       Left            =   11280
  1213.       TabIndex        =   5
  1214.       Top             =   360
  1215.       Width           =   1605
  1216.    End
  1217.    Begin VB.Menu File 
  1218.       Caption         =   "&File"
  1219.       Begin VB.Menu SelectFile 
  1220.          Caption         =   "&Select Picture"
  1221.       End
  1222.       Begin VB.Menu Exit 
  1223.          Caption         =   "&Back to Main Menu"
  1224.       End
  1225.    End
  1226.    Begin VB.Menu Help 
  1227.       Caption         =   "&Help"
  1228.       Begin VB.Menu About 
  1229.          Caption         =   "&About the Program"
  1230.       End
  1231.       Begin VB.Menu Instruction 
  1232.          Caption         =   "&Instruction"
  1233.       End
  1234.    End
  1235. End
  1236. Attribute VB_Name = "FileConverter"
  1237. Attribute VB_GlobalNameSpace = False
  1238. Attribute VB_Creatable = False
  1239. Attribute VB_PredeclaredId = True
  1240. Attribute VB_Exposed = False
  1241. 'Program and Design by GERBERT PAGTAMA
  1242. 'for more information Email : gerbert_p@yahoo.com
  1243.  
  1244.  
  1245. Option Explicit
  1246. Private m_cDIB As cDIBSection
  1247. Dim WithEvents cGif As Class
  1248. Attribute cGif.VB_VarHelpID = -1
  1249. Dim FileExt As String
  1250. Dim Original_Path, Convert_Path
  1251.  
  1252. Private mGrad As New Gradients
  1253. Public mWhatGradient As Integer
  1254. Public mWhatColor As Integer
  1255.  
  1256. Dim pressed As Boolean
  1257. Dim colpressed As Boolean
  1258. Dim point1 As pointapi
  1259. Dim point2 As pointapi
  1260. Dim New_FileExt, opt1_enb1, opt1_enb
  1261.  
  1262. Private Type pointapi
  1263.     X As Double
  1264.     Y As Double
  1265. End Type
  1266.  
  1267.  
  1268. Private Property Get SelectedColourDepth() As EDSSColourDepthConstants
  1269.    Select Case True
  1270.    Case optColourDepth(0).Value
  1271.       SelectedColourDepth = edss2Colour
  1272.    Case optColourDepth(1).Value
  1273.       SelectedColourDepth = edss16Colour
  1274.    Case optColourDepth(2).Value
  1275.       SelectedColourDepth = edss256Colour
  1276.    Case optColourDepth(3).Value
  1277.       SelectedColourDepth = edssTrueColour
  1278.    End Select
  1279. End Property
  1280.  
  1281.  
  1282.  
  1283. Private Sub About_Click()
  1284.  FrmAbout.Show
  1285. End Sub
  1286.  
  1287. Private Sub Command2_Click()
  1288.  SelectFile_Click
  1289. End Sub
  1290.  
  1291. Private Sub Exit_Click()
  1292.   FrmMain.Show
  1293.   Unload Me
  1294. End Sub
  1295.  
  1296. Private Sub Form_Load()
  1297.     optColourDepth_Click 3
  1298.     Set m_cDIB = New cDIBSection
  1299.     picCurrent.ScaleWidth = 255
  1300.     picCurrent.ScaleHeight = 255
  1301.     HScroll1.Enabled = False
  1302.     VScroll1.Enabled = False
  1303.     picCurrent.AutoSize = True
  1304.     picCurrent.ScaleMode = vbPixels
  1305.     Picture2.BorderStyle = 1
  1306.     picCurrent.BorderStyle = 0
  1307.     
  1308.      mWhatGradient = WhatGradient.Gradient01
  1309.     mWhatColor = WhatColor.Blue
  1310.     mGrad.Gradient02 Me, mWhatColor
  1311. End Sub
  1312.  
  1313. Private Sub Form_Unload(Cancel As Integer)
  1314.  FrmMain.Show
  1315. End Sub
  1316.  
  1317. Private Sub Instruction_Click()
  1318.  FrmHelpConverter.Show
  1319. End Sub
  1320.  
  1321. Private Sub picCurrent_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  1322.    Label17.Caption = X
  1323.    Label11.Caption = Y
  1324. End Sub
  1325.  
  1326. Private Sub SelectFile_Click()
  1327. On Error Resume Next
  1328.    Dim pic_w, pic_h
  1329.    Dim oPic As New StdPicture
  1330.    Dim s As String, sFile As String
  1331.    Dim chk_check
  1332.    Dim ValueTrue, ValueTrue1
  1333.    CommonDialog2.InitDir = App.Path
  1334.    CommonDialog2.Filter = "All Picture Files| *.png; *.gif; *.cel; *.pic; *.cut; *.pal; *.tga; *.pcx; *.bmp; *.tiff; *.jpg; *.jpeg; *.wmf|Portable Network Grphics  (*.png)|*.png|CompuServe Images  (*.gif)|*.gif|Autodesk Images  (*.cel,*.pic)|*.cel,*pic|DrHalo Images  (*.cut,*.pal)|*.cut,*.pal|True Vision Images  (*.tga)|*.tga|ZSoft Paintbrush  (*.pcx)|*.pcx|Bitmap Images  (*.bmp)|*.bmp|Tiff Images  (*.Tiff)|*.Tiff|Jpeg Images  (*.jpeg)|*.jpeg|Windos MetaFile  (*.wmf)|*.wmf|"
  1335.    CommonDialog2.DialogTitle = "Open File"
  1336.    CommonDialog2.ShowOpen
  1337.    cmdSave.Enabled = True
  1338.     
  1339.    For ValueTrue = 0 To 6
  1340.      Option1(ValueTrue).Enabled = True
  1341.    Next ValueTrue
  1342.    For ValueTrue1 = 0 To 3
  1343.       optColourDepth(ValueTrue1).Enabled = True
  1344.    Next ValueTrue1
  1345.    
  1346.    Set oPic = LoadPicture(Trim(CommonDialog2.FileName))
  1347.    
  1348.    m_cDIB.CreateFromPicture oPic
  1349.    picCurrent.Refresh
  1350.    
  1351.    sFile = Trim(CommonDialog2.FileName)
  1352.    s = CInt(FileLen(sFile) / 1024) & "K"
  1353.    With picCurrent
  1354.        '.AutoRedraw = True
  1355.        .FontBold = True
  1356.        .Picture = LoadPicture(sFile)
  1357.        .CurrentX = picCurrent.Width / 2 - .TextWidth(s) / 2 + 480
  1358.        .CurrentY = picCurrent.Height / 2 - .TextHeight(s) / 2
  1359.        .ForeColor = vbRed
  1360.    End With
  1361.    
  1362.    Lbl(7).Caption = s 'File Size
  1363.    
  1364.    HScroll1.Value = 0
  1365.    VScroll1.Value = 0
  1366.    If picCurrent.Width < Picture3.Width Then
  1367.       HScroll1.Enabled = False
  1368.       Else: HScroll1.Enabled = True
  1369.    End If
  1370.  
  1371.    If picCurrent.Height < Picture3.Height Then
  1372.        VScroll1.Enabled = False
  1373.         Else: VScroll1.Enabled = True
  1374.    End If
  1375.    
  1376.    Lbl(0).Caption = CommonDialog2.FileTitle
  1377.    Lbl(9).Caption = picCurrent.ScaleWidth & "  X " & picCurrent.ScaleHeight
  1378.    
  1379.    Lbl(1).Caption = Split(CommonDialog2.FileName, ".")(1)
  1380.    
  1381.   ' file  convertion
  1382.    pic_w = CDbl((picCurrent.ScaleWidth / 795) * 10)
  1383.    
  1384.    pic_h = CDbl((picCurrent.ScaleHeight / 795) * 10)
  1385.    pic_w = Round(pic_w, 2)
  1386.    pic_h = Round(pic_h, 2)
  1387.    
  1388.    
  1389.    
  1390.    lblInches.Caption = pic_h & " x " & pic_w
  1391.       
  1392.       
  1393.    
  1394.    lblPica.Caption = Round((pic_h * 0.167), 2) & " x " & Round((pic_w * 0.167), 2)
  1395.    'end of convertion
  1396.    
  1397.    For chk_check = 0 To 6
  1398.        Option1(chk_check).Enabled = True
  1399.    Next chk_check
  1400.    For opt1_enb1 = 0 To 3
  1401.      optColourDepth.Item(opt1_enb1).Enabled = True
  1402.    Next opt1_enb1
  1403.    optReduceMethod.Item(0).Enabled = True
  1404.    optReduceMethod.Item(1).Enabled = True
  1405.    optReduceMethod.Item(2).Enabled = True
  1406.    optFloydStucciType.Item(0).Enabled = True
  1407.    optFloydStucciType.Item(1).Enabled = True
  1408.    
  1409.    If Lbl(1) = "png" Then
  1410.       Option1(0).Enabled = False
  1411.       Option1(5).Value = True
  1412.       ElseIf Lbl(1) = "gif" Then
  1413.              Option1(1).Enabled = False
  1414.              Option1(5).Value = True
  1415.       ElseIf Lbl(1) = "tga" Then
  1416.              Option1(2).Enabled = False
  1417.              Option1(5).Value = True
  1418.       ElseIf Lbl(1) = "bmp" Then
  1419.              Option1(3).Enabled = False
  1420.              Option1(5).Value = True
  1421.       ElseIf Lbl(1) = "tiff" Then
  1422.              Option1(4).Enabled = False
  1423.              Option1(5).Value = True
  1424.       ElseIf Lbl(1) = "jpeg" Or Lbl(1) = "jpg" Then
  1425.              Option1(5).Enabled = False
  1426.              Option1(1).Value = True
  1427.       ElseIf Lbl(1) = "wmf" Then
  1428.              Option1(6).Enabled = False
  1429.              Option1(5).Value = True
  1430.    End If
  1431.    
  1432.    
  1433. End Sub
  1434.  
  1435. Private Sub VScroll1_Change()
  1436.     VScroll1.Max = picCurrent.Height - Picture3.Height
  1437.     picCurrent.Top = -VScroll1.Value
  1438. End Sub
  1439.  
  1440. Private Sub HScroll1_Change()
  1441.     HScroll1.Max = picCurrent.Width - Picture3.Width
  1442.     picCurrent.Left = -HScroll1.Value
  1443. End Sub
  1444.  
  1445. Private Sub optColourDepth_Click(Index As Integer)
  1446. Dim i As Long
  1447.    If optColourDepth(3).Value Then
  1448.       optReduceMethod(0).Value = True
  1449.       For i = 1 To 2
  1450.          optReduceMethod(i).Enabled = False
  1451.       Next i
  1452.    Else
  1453.       optReduceMethod(0).Value = True
  1454.       optReduceMethod(1).Enabled = True
  1455.       optReduceMethod(2).Enabled = (optColourDepth(2).Value)
  1456.    End If
  1457.    optFloydStucciType(0).Enabled = optColourDepth(2).Value And optReduceMethod(1).Value
  1458.    optFloydStucciType(1).Enabled = optColourDepth(2).Value And optReduceMethod(1).Value
  1459.    If Not (optColourDepth(2).Value) Then
  1460.       optFloydStucciType(0).Value = False
  1461.       optFloydStucciType(1).Value = False
  1462.    Else
  1463.       If Not (optFloydStucciType(0).Value Or optFloydStucciType(1).Value) Then
  1464.          optFloydStucciType(0).Value = True
  1465.       End If
  1466.    End If
  1467. End Sub
  1468. Private Sub optReduceMethod_Click(Index As Integer)
  1469.    optFloydStucciType(0).Enabled = optColourDepth(2).Value And optReduceMethod(1).Value
  1470.    optFloydStucciType(1).Enabled = optColourDepth(2).Value And optReduceMethod(1).Value
  1471.  
  1472. End Sub
  1473.  
  1474. Private Sub picCurrent_Paint()
  1475.    If Not m_cDIB Is Nothing Then
  1476.       m_cDIB.PaintPicture picCurrent.hDC
  1477.    End If
  1478.  
  1479. End Sub
  1480.  
  1481. Private Sub cmdSave_Click()
  1482.  
  1483.    Label20.Visible = True
  1484.    MsgBox "Picture Conversion May Take a Few Minutes!" + (Chr$(13) + Chr$(10)) + "Please Wait..", , "Picture File Converter-Editor"
  1485.    Dim s As String, sFile As String
  1486.    Dim sI As String
  1487.    Dim eD As EDSSColourDepthConstants
  1488.    Dim eM As EDSSColourReductionConstants
  1489.    Dim New_filename, Old_Filename, New_ExtensionName
  1490.    
  1491.    
  1492.    If Option1(0).Value = False And Option1(1).Value = False And Option1(2).Value = False And Option1(3).Value = False And Option1(4).Value = False And Option1(5).Value = False And Option1(6).Value = False Then
  1493.       MsgBox "Please Select Image Format to Convert"
  1494.        Else
  1495.        Me.MousePointer = 11
  1496.       If Option1.Item(0).Value = True Then '*.png
  1497.             FileExt = Split(CommonDialog2.FileName, ".")(0) + ".png"
  1498.             ElseIf Option1.Item(1).Value = True Then '*gif
  1499.                    FileExt = Split(CommonDialog2.FileName, ".")(0) + ".gif"
  1500.             ElseIf Option1.Item(2).Value = True Then '*.tga
  1501.                    FileExt = Split(CommonDialog2.FileName, ".")(0) + ".tga"
  1502.             ElseIf Option1.Item(3).Value = True Then '*.bmp
  1503.                    FileExt = Split(CommonDialog2.FileName, ".")(0) + ".bmp"
  1504.             ElseIf Option1.Item(4).Value = True Then 'tiff
  1505.                    FileExt = Split(CommonDialog2.FileName, ".")(0) + ".tiff"
  1506.             ElseIf Option1.Item(5).Value = True Then '*.jpeg
  1507.                    FileExt = Split(CommonDialog2.FileName, ".")(0) + ".jpeg"
  1508.             ElseIf Option1.Item(6).Value = True Then '*.wmf
  1509.                    FileExt = Split(CommonDialog2.FileName, ".")(0) + ".wmf"
  1510.         End If
  1511.         sI = (FileExt)
  1512.        If Not (sI = "") Then
  1513.           Dim cDIBSave As New cDIBSectionSave ' ' call class module for save
  1514.           eD = SelectedColourDepth()
  1515.          ' 256 colour has most options:
  1516.           If eD = edss256Colour Then
  1517.              Select Case True
  1518.                    Case optReduceMethod(0).Value
  1519.                       ' Let the system do the default when mapping the palette:
  1520.                       cDIBSave.Save sI, m_cDIB, , eD, edssSystemDefault
  1521.                       
  1522.                    Case optReduceMethod(1).Value
  1523.                       ' Floyd-Stucci reduce to the selected 256 colour palette:
  1524.                       Dim cP As New cPalette
  1525.                       Select Case True
  1526.                       Case optFloydStucciType(0).Value
  1527.                          cP.CreateHalfTone
  1528.                          cDIBSave.Save sI, m_cDIB, cP, eD, edssUsePalette
  1529.                       Case optFloydStucciType(1).Value
  1530.                          cP.CreateWebSafe
  1531.                          cDIBSave.Save sI, m_cDIB, cP, eD, edssUsePalette
  1532.                       End Select
  1533.                       
  1534.                    Case optReduceMethod(2).Value
  1535.                       ' Octree Colour quantise to generate the optimal palette:
  1536.                       cDIBSave.Save sI, m_cDIB, , eD, edssGeneratePalette
  1537.                       
  1538.                    End Select
  1539.                    
  1540.             Else
  1541.                ' Other colour depths are simpler:
  1542.                
  1543.                   If optReduceMethod(0).Value Then
  1544.                      eM = edssSystemDefault
  1545.                   Else
  1546.                      eM = edssGeneratePalette
  1547.                   End If
  1548.                   cDIBSave.Save sI, m_cDIB, , eD, eM
  1549.                   
  1550.                End If
  1551.                
  1552.             End If
  1553.  
  1554.    Me.MousePointer = 0
  1555.    Label20.Visible = False
  1556.       
  1557.     Old_Filename = CommonDialog2.FileName
  1558.     
  1559.      If Option1.Item(0).Value = True Then '*.png
  1560.             New_filename = Split(CommonDialog2.FileName, ".")(0) + ".png"
  1561.             Lbl(1).Caption = "png"
  1562.             Lbl(0).Caption = Split(Lbl(0).Caption, ".")(0) & ".png"
  1563.             ElseIf Option1.Item(1).Value = True Then '*gif
  1564.                    New_filename = Split(CommonDialog2.FileName, ".")(0) + ".gif"
  1565.                    Lbl(1).Caption = "gif"
  1566.                    Lbl(0).Caption = Split(Lbl(0).Caption, ".")(0) & ".gif"
  1567.             ElseIf Option1.Item(2).Value = True Then '*.tga
  1568.                    New_filename = Split(CommonDialog2.FileName, ".")(0) + ".tga"
  1569.                    Lbl(1).Caption = "tga"
  1570.                    Lbl(0).Caption = Split(Lbl(0).Caption, ".")(0) & ".tga"
  1571.             ElseIf Option1.Item(3).Value = True Then '*.bmp
  1572.                    New_filename = Split(CommonDialog2.FileName, ".")(0) + ".bmp"
  1573.                    Lbl(1).Caption = "bmp"
  1574.                    Lbl(0).Caption = Split(Lbl(0).Caption, ".")(0) & ".bmp"
  1575.             ElseIf Option1.Item(4).Value = True Then 'tiff
  1576.                    New_filename = Split(CommonDialog2.FileName, ".")(0) + ".tiff"
  1577.                    Lbl(1).Caption = "tiff"
  1578.                    Lbl(0).Caption = Split(Lbl(0).Caption, ".")(0) & ".tiff"
  1579.             ElseIf Option1.Item(5).Value = True Then '*.jpeg
  1580.                    New_filename = Split(CommonDialog2.FileName, ".")(0) + ".jpeg"
  1581.                    Lbl(1).Caption = "jpeg"
  1582.                    Lbl(0).Caption = Split(Lbl(0).Caption, ".")(0) & ".jpeg"
  1583.             ElseIf Option1.Item(6).Value = True Then '*.wmf
  1584.                    New_filename = Split(CommonDialog2.FileName, ".")(0) + ".wmf"
  1585.                    Lbl(1).Caption = "wmf"
  1586.                    Lbl(0).Caption = Split(Lbl(0).Caption, ".")(0) & ".wmf"
  1587.         End If
  1588.     
  1589.     New_ExtensionName = Split(CommonDialog2.FileName, ".")(1)
  1590.     sFile = Trim(New_filename)
  1591.     s = CInt(FileLen(sFile) / 1024) & "K"
  1592.    
  1593.     Lbl(7).Caption = s 'file size
  1594.      
  1595.    For opt1_enb = 0 To 6
  1596.       Option1.Item(opt1_enb).Enabled = False
  1597.    Next opt1_enb
  1598.    
  1599.    For opt1_enb = 0 To 3
  1600.     optColourDepth.Item(opt1_enb).Enabled = False
  1601.    Next opt1_enb
  1602.    optReduceMethod.Item(0).Enabled = False
  1603.    optReduceMethod.Item(1).Enabled = False
  1604.    optReduceMethod.Item(2).Enabled = False
  1605.    optFloydStucciType.Item(0).Enabled = False
  1606.    optFloydStucciType.Item(1).Enabled = False
  1607.    cmdSave.Enabled = True
  1608.    picCurrent.Refresh
  1609.    MsgBox "Succesfully Converted!", , "Picture File Converter-Editor"
  1610.   End If
  1611. End Sub
  1612.  
  1613.